package com.xmg.nio.netty;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @Author: mazhongqing
 * @Date: 2020/11/10 11:40
 */
@Component
public class SocketApplicationRunner implements ApplicationRunner {

    @Autowired
    private TcpServer tcpServer;

    @Override
    public void run(ApplicationArguments args) {
        tcpServer.startListener();
    }
}
